Repository navigation
fix(plugin-list): a sourced list shows each condition once, and a lookup chip names its record - #35744
Conversation
…lookup chip names its record The data page draws its address conditions as its own tags; the list now takes the fields it draws (hostDrawnConditionFields) and draws no locked chip for them while still filtering on them. A lookup condition chip reads the referenced record's name through the data source, keeping the id only when the name cannot be read. The condition row's Reset is drawn only while the reader has something of their own to reset. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
…he Reset rule Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
…ition Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
…finition Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
…tion Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me
…urced-list-one-condition-tag
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对ACCEPT · head Routing: no Checked:
Required before landing:
Nits (no action required):
|
|
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me Landing · head
Status: |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44679349208 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me Re-queue once · head The merge-group build 44679349208 failed one dogfood test:
Re-armed once ( |
Requested by Bill · project thread
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Fixes #35727
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ListViewtakes a new host prop,hostDrawnConditionFields(a list of field names). Conditions ofschema.filteron those fields still constrain the query exactly as before; the condition row (ConditionChipRow, new prophostDrawnFields) simply draws no locked chip for them. The data page passes its address-condition fields there, so a sourced open shows each condition once, as the page's own 「Filtered by」 tag.authoredFilter) feeds the fetch, the page-reset signature, the export, the self-querying child views, the empty-state copy and Save-as-view. Moving the address conditions out ofschema.filterwould have to re-thread every one of those readers; naming which fields the host draws changes only what the chip row renders, and the query path is byte-identical. It is a host prop, never a schema key: which surface draws a condition is the page's layout, not anything an author writes.find(target, { $filter: { id: { $in: ids } } })), named by the lookup'sdisplayFieldelse the target's name field (referencedRecordTitle). It falls back to the id only when the name cannot be read. One read per target, re-run only when the targets or ids change (keyed on content, not on array identity).ConditionChipRow'sresetDisabledprop is gone;ListViewpassesonResetonly when the conditions differ from the view.ListViewchanged — one added prop,hostDrawnConditionFields={urlFilters.map(([field]) => field)}, plus its comment, right afterrowOpensRecord={recordServed}. The page's tag row is untouched (it belongs to the open PR fix(record-page): the related tab offers only open-in-list and one add entry; a multi-pick add is all or none #35725 for the related tab, which adds the page's own Reset and names the tag).Read first, by risk:
ui/packages/plugin-list/src/conditions/ListConditionControls.tsx—useLookupValueNames(the one read the chip row now makes) and thehostDrawnFieldsfilter onviewChips.ui/packages/plugin-list/src/ListView.tsx— theConditionChipRowcall site (onReset={conditionsDifferFromView ? handleResetConditions : undefined}).ui/packages/app-shell/src/views/ObjectDataPage.tsx— the one addedListViewprop.Two-minute check: open the showcase Contacts data page with
filter[account]=set to any account id (or an account's Contacts tab → 「↗」). Expect one 「筛选条件 · 客户」 tag at the top, no row of chips under the view bar, and the record count matching that account. Add a 阶段 filter: its chip, 「+ 添加筛选」 and one enabled 「重置」 appear.Tests
All at merged head
eae54db249(after mergingorigin/mainat03bce5c22a).ConditionChipRow(listConditions.test.tsx): a host-drawn field gets no locked chip while the view's other conditions keep theirs (with a CONTROL without the prop); all-host-drawn and nothing else ⇒ the row draws nothing; a locked lookup chip readsAccount: = Globexand the read isfind('account', { $top: 1, $filter: { id: { $in: ['a1'] } } }); the reader's lookup chip readsAccount: Globex, Initech; a failing read keeps the id. The Reset pin now asserts no Reset is drawn when the host passes none.ListView(ListView.harness.test.tsx, new blockListView.hostDrawnConditions-35727), zh and en each: a host-drawn condition is no locked chip and no Reset and the record query still carries it; a saved view filtered on a lookup locksAccount:= Globex/Account: = Globex, never the id, and draws no Reset; once the reader adds a condition, exactly one Reset (重置/Reset).ListView.conditionRow-35549.test.tsx: the locked-chip case now asserts no Reset rather than a disabled one.ListView(ObjectDataPage.sourcedOpenOneTag-35727.test.tsx), zh and en:filter[account]=acc_1draws one page tag, zero locked chips, no list Reset, and the record query still carriesacc_1; CONTROL: no address condition ⇒ no tag and an unfiltered read.Run readings
pnpm --dir ui exec vitest run --maxWorkers=2overplugin-list/src/conditions/,ListView.harness,ListView.conditionRow-35549,ListView.clearFiltersChips-29052,ListView.emptyStateClearFilters-28908and the sevenObjectDataPage.*tests →Test Files 12 passed (12),Tests 246 passed (246), lockVERDICT command-exit 0.pnpm --filter @object-ui/plugin-list run type-check→ exit 0 (afterturbo run build --filter='@object-ui/app-shell^...', 68/68 tasks).pnpm --filter @object-ui/app-shell run type-check→ exit 0.pnpm --dir ui exec vitest run scripts/→Test Files 171 passed | 2 skipped,Tests 5092 passed | 2 skipped.Ablations (one per changed behaviour; each via scripts/ablation-replace.mjs, mutation proven on disk, restored to the HEAD blob)
hostDrawnConditionFieldsprop → both data-page cases red (a locked chip appears); CONTROL stays green.hostDrawnFieldsfilter with a pass-through → 6 red (twoConditionChipRowcases, the four host-drawnListViewcases).describeConditionValue→ 4 red (twoConditionChipRowname cases, the zh/en saved-view lookup cases).onReset→ 3 red (the zh/en saved-view cases and the 35549 locked-chip case). The data-page no-Reset case stays green under this one by design: with every condition host-drawn and nothing of the reader's, the row draws nothing at all.Acceptance notes
filter[account]= Northwind's id):origin/main5ecf937470: page tags 1 (「客户 = Pf5mgR55cgCKt58S」), locked chips 1 (「客户:= Pf5mgR55cgCKt58S」), list Reset 1 (drawn, disabled), 「+ 添加筛选」 1;mainalone the sourced data page now shows no Reset at all (the page tag's × still clears the condition); the open PR fix(record-page): the related tab offers only open-in-list and one add entry; a multi-pick add is all or none #35725 for the related tab adds the page's single Reset and names the page tag. Whichever of the two lands second mergesmain;overlap-checkagainstmainand against that PR's branch both answer clean.list-condition-row-35549.spec.tspresses Reset only after adding a sort and a filter, so it is unaffected.user-type lookup with no declaredreferencestill prints its id in a chip: the value picker defaults such a field tousersinline, and this change reads only a declaredreferenceTorather than copying that default.ListViewhost props (rowOpensRecord,page); the newhostDrawnConditionFieldsis documented on the prop's own JSDoc and in the changeset, not in the README, which is outside this card's file surface.canRead, so a fresh function per render (as the sibling tests' stand-ins return, harmless there because they stubListView) re-reads the records without end.Verification
node scripts/pm/dispatch-gates.mjs --commands(treef64696e915, re-derived identical at the final tree): 38 families, all run locally, all exit 0 after one fix —check:test-source-aliasfirst flagged the new data-page test for reaching a dynamicimport('@objectstack/lint'); the test now pays that load at module top, and the gate is green.--ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN. The onevitest run scripts/run that was killed by the box's memory limit was re-run alone and passed.pnpm check:new-line-citations→ 0 new citations. Control-byte self-scan over the diff: no hits.eslintover the changed files: 0 errors.Generated by Claude Code